import java.util.Random;

public class Work05 {
    public static void main(String[] args) {
        int[]a=new int[10];
        Random ran = new Random();
        for(int i =0;i<a.length;i++){
            a[i]=ran.nextInt(10);
        }
        int max=0;
        for(int i =0;i<a.length;i++){
            if(a[i]>max){
                max=a[i];
            }
        }
        System.out.println("最大值为"+max);
    }
}
